package com.yilin.platform.service.user;


import com.yilin.platform.base_core.application.PageData;
import com.yilin.platform.base_core.commons.base.BaseAuth;
import com.yilin.platform.base_core.commons.base.BaseEntity;
import com.yilin.platform.base_core.commons.entity.AuthData;
import com.yilin.platform.base_core.commons.entity.AuthStatusData;
import com.yilin.platform.entity.user.Account;
import com.yilin.platform.entity.user.auth.*;

import java.util.List;

public interface IAuthService {

    PageData<? extends BaseAuth> getAuthPage(Account loginUser, AuthData.AuthItem authItem, BaseEntity query, Integer start, Integer limit);

    List<AuthData> getUserAuthData(Account user);

    List<AuthStatusData> getUserAuthStatus(Account account);

    void checkAuthStatus(Account account,Account loginUser, AuthData.AuthItem authItem);

    IdCard getIdCardByUserId(String accountId);

    IdCard getIdCardByIdCardNo(String idCardNo);


    DrivingLicense getDrivingLicenseByUserId(String accountId);

    QualificationCert getQualificationCertByUserId(String accountId);

    BusinessLicense getBusinessLicenseByOrganizeId(String organizeId);

    TransBusinessLicense getTransLicenseByOrganizeId(String organizeId);

    void saveIdCardAuth(Account loginUser, IdCard idCard);

    void saveBusinessLicenseAuth(Account loginUser, BusinessLicense businessLicense);

    void saveTransBusinessLicenseAuth(Account loginUser, TransBusinessLicense transBusinessLicense);

    void saveDrivingLicenseAuth(Account loginUser, DrivingLicense drivingLicense);

    void saveQualificationCertAuth(Account loginUser, QualificationCert qualificationCert);

    void verifyAndUpdateAuth(BaseAuth baseAuth, Account loginUser);

    void autoCertificatesOverdue();

    void deleteIdCardById(IdCard idCard);

    void deleteDrivingLicenseById(DrivingLicense drivingLicense);

    void deleteQualificationCertById(QualificationCert qualificationCert);

    void deleteBusinessLicenseById(BusinessLicense businessLicense);

    void deleteTransBusinessLicense(TransBusinessLicense transBusinessLicense);

    void restoreLogicIdCardByNo(IdCard idCard);

    void restoreLogicDrivingLicenseByNo(DrivingLicense drivingLicense);

    void restoreLogicQualificationCertByNo(QualificationCert qualificationCert);

    void restoreLogicBusinessLicenseByNo(BusinessLicense businessLicense);

    void restoreLogicTransBusinessLicenseByNo(TransBusinessLicense transBusinessLicense);

}
